﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.Entity;
using School.Entities;
using School.Accounting;
using School.Accounting.Reports;

namespace School.Pages.Accounting
{
    public partial class PaymentOrderPrinting : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            long number = 0;

            //if(long.TryParse(Request.QueryString["Number"],out number))
            //{
            //    var po = PaymentOrder.GetPaymentReport(number);

            //    if (po != null)
            //    {
            //        LblCampusName.Text = po.Campus;
            //        LblCertificateName.Text = po.Certificate;
            //        LblStageName.Text = po.Stage;
            //        LblGradeName.Text = po.Grade;
            //        LblStudentName.Text = po.Student;
            //        LblPaymentOrderNumber.Text = po.Number.ToString();
            //        LblPrice.Text = po.Value;
            //        LblDate.Text = po.Date;
            //        LblExpenseName.Text = po.Expense;

            //        GridView1.DataSource = PaymentOrder.GetDiscountsReport(number);
            //        GridView1.DataBind();
            //    }
            //}
        }

        protected string GetValue(object type, object value)
        {
            return type.ToString() == "1" ? value.ToString() + " جنيه" : value.ToString() + "%";
        }
    }
}